/*
 * lir_map_ir.c
 *
 * Implements mapping of an IR to a lower-level IR.
 *
 * What is the purpose of yet another IR that seems similar to the IR
 * we have already ? Code generation backends should be mapping the
 * LIR to their target code. But the IR may contain information that
 * can optimize the generation of the LIR.
 *
 * For example, the arguments-passing convention. Should the caller
 * readjust the stack, or the callee ? Should the callee pop the
 * arguments, use them, and readjust the stack as if it didn't pop
 * them at all, or should he just copy them (with a move command) ?
 * How many registers are there available for our target architecture
 * ? This logic should be in the mapping of the LIR from the
 * IR. Currently, our IR is extremely naive and enforces the calling
 * conventions. A smarter convention could be implemented in the
 * IR-to-LIR mapping (in this file), if the IR captures enough
 * information in its data structures.
 *
 * Thus let's be aware of this limitation and code generate from an
 * LIR that we assume is optimized.
 *
 * After transforming from the frontend to the IR, we will never touch
 * the parse tree again. We use the symbol table.
 */

#include "lir_map_ir.h"
#include "lir.h"
#include "gen.h"



struct lir_t *lir_map_ir_create(struct ir_t *ir)
{
	struct lir_t * lir = lir_map_ir(ir);
	return lir;
}
